package cn.yllr.tomgxianghui.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ForwardController {
    /**
     * 将/index.html路径绑定到跳转首页，这样url路径哪里就不会显示，真正的api路径
     * @return
     */
    @RequestMapping(value = {"/", "/index.html"})
    public String index() {
        return "forward:/dishes/recommend";
    }

    /**
     * 将shopCart.html路径绑定到跳转购物车，这样url路径哪里就不会显示，真正的api路径
     * @return
     */
    @RequestMapping("/shopCart.html")
    public String shopCart() {
        return "forward:/cart/toCart";
    }
}
